From d902f3ecec475b0102dd9bda433b37b26a197385 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 19 Jan 2004 18:15:22 +0000 Subject: [PATCH] OSes with 64bit file i/o and LP64 model *must* have lseek prototyped... --- gpsbabel/coldsync/pdb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gpsbabel/coldsync/pdb.c b/gpsbabel/coldsync/pdb.c index e30e725ba..b7d4f9807 100644 --- a/gpsbabel/coldsync/pdb.c +++ b/gpsbabel/coldsync/pdb.c @@ -6,7 +6,7 @@ * You may distribute this file under the terms of the Artistic * License, as specified in the README file. * - * $Id: pdb.c,v 1.4 2004-01-18 01:24:41 robertl Exp $ + * $Id: pdb.c,v 1.5 2004-01-19 18:15:22 robertl Exp $ */ /* XXX - The way zero-length records are handled is a bit of a kludge. They * shouldn't normally exist, with the exception of expunged records. But, @@ -26,6 +26,16 @@ #include #include /* For open() */ #include +/* + * Unistd.h (indeed, read, write, and lseek) are not part of ISO C. + * Systems may not have unistd.h. While the below is tacky, Windows + * is the only system that we care about that has lseek and friends + * but doesn't have it prototyped. Systems with 64-bit file I/O but + * based on LP64 model (i.e. OS/X) _require_ the prototype for lseek. + */ +#if !defined (__WIN32__) +#include +#endif #include #include -- 2.30.2